package day7;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class FoodSuply {
    public static void main(String[] args) {
        final int N = 10;
        int count = 0;//当前多少单
        String names[] = new String[N];
        String address[] = new String[N];
        double totalPrices[] = new double[N];
        boolean confirm[] = new boolean[N];
        int times[] = new int[N];
        String foods[] = {"鱼香肉丝", "肉焖茄子", "红烧鲤鱼"};
        double prices[] = {18, 25.6, 30.6};
        int prize[] = new int[foods.length];//点赞
        int choice = 0;
        Scanner in = new Scanner(System.in);
        while (true) {
            System.out.println("1:我要订餐");
            System.out.println("2:查看餐袋");
            System.out.println("3:我要订餐");
            System.out.println("4:我要订餐");
            System.out.println("9:退出系统");
            choice = in.nextInt();
            if (choice == 1) {
                for (int i = 0; i < foods.length; i++) {
                    System.out.println(foods[i] + "\t" + prices[i] + "\t" + prize[i]);
                }
                //找到空位置
                if (count >= names.length) {
                    System.out.println("已满，放不下了");
                    continue;
                }
                System.out.println("客户姓名：");
                names[count] = in.next();
                ///。。。。。
                count++;
//                int index = -1;
//                for (int i = 0; i < names.length; i++) {
//                    if (names[i] == null) {
//                        index = i;
//                        break;
//                    }
//                }
//                if (index == -1) {
//                    System.out.println("已满，放不下了");
//                }
            } else if (choice == 2) {

            }
        }
    }
}
